package com.ruoyi.hov.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.DynamicAnnotation;
import com.ruoyi.common.core.domain.SuperEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * <p>
 * hov主表
 * </p>
 *
 * @author XiaShiLong
 * @since 2021-04-01
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("dl_hov")
@ApiModel(value = "Hov对象", description = "hov主表")
public class Hov extends SuperEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @DynamicAnnotation("主键")
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 表名
     */
    @DynamicAnnotation("表名")
    @ApiModelProperty(value = "表名")
    private String tableName;

    /**
     * 类名
     */
    @DynamicAnnotation("类名")
    @ApiModelProperty(value = "类名")
    private String className;

    /**
     * 类路径
     */
    @DynamicAnnotation("类路径")
    @ApiModelProperty(value = "类路径")
    @NotBlank
    private String classPath;

    /**
     * 菜单id
     */
    @DynamicAnnotation("菜单id")
    @ApiModelProperty(value = "菜单id")
    private Long menuId;

    /**
     * hov名称
     */
    @DynamicAnnotation("hov名称")
    @ApiModelProperty(value = "hov名称")
    @NotBlank
    private String name;

    /**
     * 多选(0否,1是)
     */
    @DynamicAnnotation("多选(0否,1是)")
    @ApiModelProperty(value = "多选(0否,1是)")
    private Integer multipleSelect;

    /**
     * hov详情集合
     */
    @TableField(exist = false)
    @NotEmpty(message = "HovDtlList must not be empty!")
    List<HovDtl> hovDtlList;
}
